import React, { Component } from 'react'

export default class Home extends Component {
    constructor(){
        super()
        this.state={
            num:30
        }
    }
    fn=()=>{
        this.setState({
            num:this.state.num+1
        })
    }
    fn1=()=>{
        this.setState({
            num:this.state.num-1
        })
    }
  render() {
    return (
      <div>Home{this.state.num}
      <br/><button onClick={this.fn}>+</button>
      <br/><button onClick={this.fn1}>-</button>
      </div>
    )
  }
}
